﻿using System;
using HiTeachers.Services;

namespace HiTeachers.Web
{
    public partial class StaticPageDetails : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack) return;

            var itemId = new Guid(Request["itid"]);

            var page = StaticPageServices.GetById(itemId);
            if (page == null) return;

            ltrTitle.Text = page.Title;
            ltrContent.Text = page.Content;
            lnkGoback.HRef = (page.ContentType == Entities.ContentType.Guids) ? "Guide.aspx" : "Faqs.aspx";
        }
    }
}
